package com.k136.controller;

import com.k136.service.PersonService;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * TODO 类
 * @author LiuTai
 * @Date 2024/9/24
 * @version 1.00
 */
@Controller
@RequestMapping("/person")
//@CrossOrigin(origins = "*")
public class PersonController {
    @Resource
    private PersonService personService;
    @RequestMapping("selAll/{pageNo}")
    public String selAll(
            @PathVariable("pageNo")Integer pageNo,
            Model model){
        model.addAttribute("person",personService.pageAllPerson(pageNo,3));
        return "index";
    }
}
